<template>
  <div class="page-header-index-wide" style="margin-top:100px">
    <!-- <a-row :gutter="24">
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="11">
        <label><h3>理赔动态</h3></label>
      </a-col>
    </a-row>
    <a-row :gutter="24" v-if="loginfo.isadmin==0">
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="被投保订单" >
          <a slot="linker" @click="handleOrder1">{{ loginfo.number5 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="订单被驳回" >
          <a slot="linker" @click="handleOrder2">{{ loginfo.number6 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="投保账单" >
          <a slot="linker" @click="handleOrder3">{{ loginfo.number7 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="理赔被驳回" >
          <a slot="linker" @click="handleOrder4">{{ loginfo.number1 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="4" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="理赔结案" >
          <a slot="linker" @click="handleOrder5">{{ loginfo.number2 | NumberFormat}}</a>
        </chart-card>
      </a-col>
    </a-row>
    <a-row :gutter="24" v-if="loginfo.isadmin==0">
      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" :push="4">
        <chart-card :loading="loading" title="赔付金额待确认" >
          <a slot="linker" @click="handleOrder6">{{ loginfo.number3 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" :push="4">
        <chart-card :loading="loading" title="待提交理赔材料" >
          <a slot="linker" @click="handleOrder7">{{ loginfo.number4 | NumberFormat}}</a>
        </chart-card>
      </a-col>
    </a-row>
    <a-row :gutter="24" v-if="loginfo.isadmin==1">
      <a-col :sm="24" :md="12" :xl="5" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="投保订单待审核" >
          <a slot="linker" @click="handleOrder13">{{ loginfo.number13 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="5" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="报案待审核" >
          <a slot="linker" @click="handleOrder8">{{ loginfo.number8 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="5" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="材料待审核" >
          <a slot="linker" @click="handleOrder9">{{ loginfo.number9 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="5" :style="{ marginBottom: '24px' }" :push="2">
        <chart-card :loading="loading" title="赔付金额有异议" >
          <a slot="linker" @click="handleOrder10">{{ loginfo.number10 | NumberFormat}}</a>
        </chart-card>
      </a-col>
    </a-row>
    <a-row :gutter="24" v-if="loginfo.isadmin==1">
      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" :push="4">
        <chart-card :loading="loading" title="待结案审核" >
          <a slot="linker" @click="handleOrder11">{{ loginfo.number11 | NumberFormat}}</a>
        </chart-card>
      </a-col>
      <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }" :push="4">
        <chart-card :loading="loading" title="账单核定" >
          <a slot="linker" @click="handleOrder12">{{ loginfo.billNumber | NumberFormat}}</a>
        </chart-card>
      </a-col>
    </a-row> -->
  </div>
</template>

<script>
  import ChartCard from '@/components/ChartCard'
  import ACol from "ant-design-vue/es/grid/Col"
  import ATooltip from "ant-design-vue/es/tooltip/Tooltip"
  import MiniArea from '@/components/chart/MiniArea'
  import MiniBar from '@/components/chart/MiniBar'
  import MiniProgress from '@/components/chart/MiniProgress'
  import RankList from '@/components/chart/RankList'
  import Bar from '@/components/chart/Bar'
  import LineChartMultid from '@/components/chart/LineChartMultid'
  import HeadInfo from '@/components/tools/HeadInfo.vue'
   import { httpAction, getAction } from '@/api/manage'
  import Trend from '@/components/Trend'
  import { getLoginfo,getVisitInfo } from '@/api/api'

 
  export default {
    name: "IndexChart",
    components: {
      ATooltip,
      ACol,
      ChartCard,
      MiniArea,
      MiniBar,
      MiniProgress,
      RankList,
      Bar,
      Trend,
      LineChartMultid,
      HeadInfo
    },
    data() {
      return {
        loading: true,
        center: null,
        loginfo:{},
        visitFields:['ip','visit'],
        visitInfo:[],
        indicator: <a-icon type="loading" style="font-size: 24px" spin />
      }
    },
    created() {
      setTimeout(() => {
        this.loading = !this.loading
      }, 1000)
      // this.loadDatas();
    },
    methods: {
      handleOrder1(){
        // alert("123123231")
        this.$router.replace({ path: '../insure/InInsureOrderList',query:{activeKey:"2"} })    
      },
      handleOrder2(){
        this.$router.replace({ path: '../insure/InInsureOrderList',query:{activeKey:"3"} })    
      },
      handleOrder3(){
        this.$router.replace({ path: '../bill/InOrderBillLists',query:{} })    
      },
      handleOrder4(){
        this.$router.replace({ path: '../report/InReportCaseAllList',query:{btn:"8"} })    
      },
      handleOrder5(){
        this.$router.replace({ path: '../report/InReportCaseAllList',query:{btn:"9"} })    
      },
      handleOrder6(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"4"} })    
      },
      handleOrder7(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"2"} })    
      },

      handleOrder8(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"1"} })    
      },
      handleOrder9(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"3"} })    
      },
      handleOrder10(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"5"} })    
      },
      handleOrder11(){
        this.$router.replace({ path: '../report/InReportCaseList',query:{btn:"6"} })    
      },
      handleOrder12(){
        this.$router.replace({ path: '../bill/InOrderBillList',query:{} })    
      },
      handleOrder13(){
        this.$router.replace({ path: '../insure/InInsureOrderList',query:{activeKey:"1"} })    
      },
      loadDatas(){
          let that = this;
        getAction("/order/inInsureOrder/queryHomeData",{}).then((res)=>{
          if(res.success){
            console.log('----countNumber---',res.result);
            that.loginfo=res.result
          }else{
            that.$message.warning(res.message);
          }
        })
      },
    }
  }
</script>

<style lang="less" scoped>
  .circle-cust{
    position: relative;
    top: 28px;
    left: -100%;
  }
  .extra-wrapper {
    line-height: 55px;
    padding-right: 24px;

    .extra-item {
      display: inline-block;
      margin-right: 24px;

      a {
        margin-left: 24px;
      }
    }
  }

  /* 首页访问量统计 */
  .head-info {
    position: relative;
    text-align: left;
    padding: 0 32px 0 0;
    min-width: 125px;

    &.center {
      text-align: center;
      padding: 0 32px;
    }

    span {
      color: rgba(0, 0, 0, .45);
      display: inline-block;
      font-size: .95rem;
      line-height: 42px;
      margin-bottom: 4px;
    }
    p {
      line-height: 42px;
      margin: 0;
      a {
        font-weight: 600;
        font-size: 1rem;
      }
    }
  }
</style>